home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98a.txt / 000093_icon-group-sender _Wed Mar 4 16:30:06 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.8.7/8.8.7) with SMTP id QAA18097
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Wed, 4 Mar 1998 16:30:06 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA07198; Wed, 4 Mar 1998 16:30:05 -0700
  7. Date: Wed, 4 Mar 1998 21:04:52 +0300 (MEST)
  8. From: Ehud Lamm <mslamm@mscc.huji.ac.il>
  9. To: gep2@computek.net
  10. Cc: icon-group@optima.CS.Arizona.EDU
  11. Subject: Re: Icon to C conversion
  12. In-Reply-To: <199803030539.XAA24309@axp.cmpu.net>
  13. Message-Id: <Pine.A32.3.91.980304210200.30650A-100000@pluto.mscc.huji.ac.il>
  14. Mime-Version: 1.0
  15. Content-Type: TEXT/PLAIN; charset=US-ASCII
  16. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  17. Status: RO
  18. Content-Length: 1002
  19.  
  20. >
  21. > You can't really use C-style null-terminated strings as Icon strings, since I$
  22. > strings can ABSOLUTELY contain one or more embedded binary zero bytes.
  23. >
  24. > This makes the C strlen() function essentially useless.  You have to implemen$
  25. > strings in some other way, perhaps maintaining a separate count somewhere.
  26.  
  27. To make myself clearer: I didn't mean to say C string are the same as
  28. Icon strings. I just gave an example of a kind of optimization you *may*
  29. perform. For example you may decide to treat certain known strings as C
  30. strings, or to allow this optimization if the programmer specifies it is
  31. allowed.
  32.  
  33. The question really isn't wether C strings can be used as Icon strings, 
  34. but rather that in order to produce good C code to function exactly like 
  35. the Icon code (as compiled Icon should), you have first to deeply explore 
  36. the bset ways to do the desired things in C. You shouldn't only think 
  37. about compilation techniques and optimizations.
  38.  
  39. Ehud Lamm     mslamm@pluto.mscc.huji.ac.il
  40.  
  41.